-
-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(#8074): add filter by parent to db-object widget #8759
Conversation
@jkuester I still need to complete the e2e, but I wanted your feedback on this work. I tried not to make big changes in the code and to keep it simple for app builders. |
@Benmuiruri @tatilepizs, welcome to review as well. @tatilepizs, do you think waiting for Enketo's e2e refactor is better? I'm still trying to figure out how to check the dropdown options. |
Hey,
Depending on the urgency of this feature. I sent the PR to review yesterday, and I expect feedback until next year because a lot of us will be on vacation these last weeks of the year. So I don't think that the PR will be merged soon.
I didn't add a common option to validate dropdowns because I think that only one test that we have right now contains the dropdown widget. Thank you @latin-panda |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks great! 🤩 Very clean and well tested!
One concern I have is around the naming of with-same-parent
. To me, that sounds like it will be filtering the searchable contacts to be limited to siblings of the contact in context (the ones that have the same parent as the current contact). However, with this implementation, it is actually limiting the searchable contacts to children of the contact in context (and all their descendants).
An appearance name more like descendant-of-current-contact
would make more sense to me (not a huge fan of that name either, but it seems more accurate and I have not been able to think of a better one)....
Also, just a reminder that we definitely want to update the docs to describe this functionality!
@michaelkohn What do you think about Josh's idea of using IMO, it's long but descriptive. I prefer things to be descriptive :) |
…new-dbobject-filter
const firstElement = $('.select2-results__options > li'); | ||
await (await firstElement).waitForClickable(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was struggling with this e2e being flaky, this seems to work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @latin-panda for adding the e2e test.
I just left a comment in place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work!
@tatilepizs When you have time, can you please review this again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good @latin-panda, thank you!! 🌟
…new-dbobject-filter
Documentation for the new filter in db-object widget PR in CHT-Core: medic/cht-core#8759
Description
descendant-of-current-contact
contact_by_parent
in combination with the contact type.Usage
#8074
CHT Docs PR
Code review checklist
Compose URLs
If Build CI hasn't passed, these may 404:
License
The software is provided under AGPL-3.0. Contributions to this project are accepted under the same license.